import { secret } from "@/config";
import { http } from "..";
import { Equip, Music } from "../interface";

/**
 * @use 获取所有设备接口
 */
export const getEquipListApi = () => {
  return http.get<Equip.EquipOptionsRes[]>(`/general/alldeviceinfo?secret=${secret}`);
};

/**
 * @use 获取所有音乐列表接口
 */
export const getMusicListApi = () => {
  return http.get<Music.MusicOptionsRes>(
    `/general/servermusicinfo?secret=${secret}`
  );
};

/*
 * @use 获取音量接口
 */
export const getChangeVolumeAip = (data: Equip.EquipChangeVolReq) => {
  return http.post(`/general/setvol`, data);
};
